import request from '@/utils/request'

// 查询文章分页列表
export function listArticle(page) {
    return request({
        url: '/api-blog/management/article/list',
        method: 'post',
        data: page
    })
}

// 查询文章详细
export function infoArticle(articleId) {
    return request({
        url: '/api-blog/management/article/info/' + articleId,
        method: 'get'
    })
}


// 新增文章
export function addArticle(data) {
    return request({
        url: '/api-blog/management/article/add',
        method: 'post',
        data: data
    })
}

// 修改文章
export function editArticle(data) {
    return request({
        url: '/api-blog/management/article/edit',
        method: 'post',
        data: data
    })
}

// 删除文章
export function removeArticle(articleId) {
    return request({
        url: '/api-blog/management/article/remove/' + articleId,
        method: 'delete'
    })
}